package ahut2020.day14;

public class Permutation {
    public static void main(String[] args) {
        for (int a = 0; a < 4; a++)
            for (int b = 0; b < 4; b++)
                for (int c = 0; c < 4; c++)
                    for (int d = 0; d < 4; d++) {//O(n^n)>>O(n!)
                        if (a != b && a != c && a != d && b != c && b != d && c != d)
                            System.out.println(String.format("%d %d %d %d", a, b, c, d));
                    }
    }
}
